#include "Field.h"

using namespace Chess;

Field::Field(void) : m_figure(0), m_status(Chess::FieldStatusEnum::NONE)
{
}

Field::~Field(void)
{
}

void Field::SetFigure(IFigure* figure)
{
  m_figure = figure;
}

void Field::RemoveFigure(void)
{
  m_figure = 0;
}

bool Field::Occupied(void)
{
  return m_figure != 0;
}

void Field::SetStatus(FieldStatusEnum status)
{
  m_status = status;
}

FieldStatusEnum Field::GetStatus()
{
  return m_status;
}

IFigure* Field::GetFigure()
{
  if(Occupied())
    return m_figure;
  return NULL;
}